﻿ 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Gtkj.CMS.Model;
using EntityFramework.Extensions;

namespace Gtkj.CMS.DAL
{
		
	public partial class AdminInfoDAL :BaseDAL<AdminInfo>
    {
	/// <summary>
        /// 根据条件更新
        /// </summary>
        /// <param name="whereLamdba">条件</param>
        /// <param name="updateLamdba">更新内容</param>
        /// <returns></returns>
		public bool EditExtend(System.Linq.Expressions.Expression<Func<AdminInfo, bool>> whereLamdba, System.Linq.Expressions.Expression<Func<AdminInfo, AdminInfo>> updateLamdba)
			{
				entity.AdminInfo.Where(whereLamdba).Update(updateLamdba);
				return true;
			}
		/// <summary>
        /// 根据条件删除
        /// </summary>
        /// <param name="whereLamdba">条件</param>
        /// <returns></returns>
		public bool DeleteEntityExtend(System.Linq.Expressions.Expression<Func<AdminInfo, bool>> whereLamdba)
        {
            entity.AdminInfo.Where(whereLamdba).Delete();
            return true;
        }
    }
		
	public partial class CustomerDAL :BaseDAL<Customer>
    {
	/// <summary>
        /// 根据条件更新
        /// </summary>
        /// <param name="whereLamdba">条件</param>
        /// <param name="updateLamdba">更新内容</param>
        /// <returns></returns>
		public bool EditExtend(System.Linq.Expressions.Expression<Func<Customer, bool>> whereLamdba, System.Linq.Expressions.Expression<Func<Customer, Customer>> updateLamdba)
			{
				entity.Customer.Where(whereLamdba).Update(updateLamdba);
				return true;
			}
		/// <summary>
        /// 根据条件删除
        /// </summary>
        /// <param name="whereLamdba">条件</param>
        /// <returns></returns>
		public bool DeleteEntityExtend(System.Linq.Expressions.Expression<Func<Customer, bool>> whereLamdba)
        {
            entity.Customer.Where(whereLamdba).Delete();
            return true;
        }
    }
		
	public partial class OrderDAL :BaseDAL<Order>
    {
	/// <summary>
        /// 根据条件更新
        /// </summary>
        /// <param name="whereLamdba">条件</param>
        /// <param name="updateLamdba">更新内容</param>
        /// <returns></returns>
		public bool EditExtend(System.Linq.Expressions.Expression<Func<Order, bool>> whereLamdba, System.Linq.Expressions.Expression<Func<Order, Order>> updateLamdba)
			{
				entity.Order.Where(whereLamdba).Update(updateLamdba);
				return true;
			}
		/// <summary>
        /// 根据条件删除
        /// </summary>
        /// <param name="whereLamdba">条件</param>
        /// <returns></returns>
		public bool DeleteEntityExtend(System.Linq.Expressions.Expression<Func<Order, bool>> whereLamdba)
        {
            entity.Order.Where(whereLamdba).Delete();
            return true;
        }
    }
		
	public partial class SummaryDAL :BaseDAL<Summary>
    {
	/// <summary>
        /// 根据条件更新
        /// </summary>
        /// <param name="whereLamdba">条件</param>
        /// <param name="updateLamdba">更新内容</param>
        /// <returns></returns>
		public bool EditExtend(System.Linq.Expressions.Expression<Func<Summary, bool>> whereLamdba, System.Linq.Expressions.Expression<Func<Summary, Summary>> updateLamdba)
			{
				entity.Summary.Where(whereLamdba).Update(updateLamdba);
				return true;
			}
		/// <summary>
        /// 根据条件删除
        /// </summary>
        /// <param name="whereLamdba">条件</param>
        /// <returns></returns>
		public bool DeleteEntityExtend(System.Linq.Expressions.Expression<Func<Summary, bool>> whereLamdba)
        {
            entity.Summary.Where(whereLamdba).Delete();
            return true;
        }
    }
		
	public partial class sysdiagramsDAL :BaseDAL<sysdiagrams>
    {
	/// <summary>
        /// 根据条件更新
        /// </summary>
        /// <param name="whereLamdba">条件</param>
        /// <param name="updateLamdba">更新内容</param>
        /// <returns></returns>
		public bool EditExtend(System.Linq.Expressions.Expression<Func<sysdiagrams, bool>> whereLamdba, System.Linq.Expressions.Expression<Func<sysdiagrams, sysdiagrams>> updateLamdba)
			{
				entity.sysdiagrams.Where(whereLamdba).Update(updateLamdba);
				return true;
			}
		/// <summary>
        /// 根据条件删除
        /// </summary>
        /// <param name="whereLamdba">条件</param>
        /// <returns></returns>
		public bool DeleteEntityExtend(System.Linq.Expressions.Expression<Func<sysdiagrams, bool>> whereLamdba)
        {
            entity.sysdiagrams.Where(whereLamdba).Delete();
            return true;
        }
    }
		
	public partial class VisitDAL :BaseDAL<Visit>
    {
	/// <summary>
        /// 根据条件更新
        /// </summary>
        /// <param name="whereLamdba">条件</param>
        /// <param name="updateLamdba">更新内容</param>
        /// <returns></returns>
		public bool EditExtend(System.Linq.Expressions.Expression<Func<Visit, bool>> whereLamdba, System.Linq.Expressions.Expression<Func<Visit, Visit>> updateLamdba)
			{
				entity.Visit.Where(whereLamdba).Update(updateLamdba);
				return true;
			}
		/// <summary>
        /// 根据条件删除
        /// </summary>
        /// <param name="whereLamdba">条件</param>
        /// <returns></returns>
		public bool DeleteEntityExtend(System.Linq.Expressions.Expression<Func<Visit, bool>> whereLamdba)
        {
            entity.Visit.Where(whereLamdba).Delete();
            return true;
        }
    }
	
}